import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Index',
    component: () => import('../views/Index.vue'),
    meta:{
      istrue:true,
      requireAuth:false
    }
  },
  {
    path: '/Classify',
    name: 'Classify',
    component: () => import('../views/Classify.vue'),
    meta:{
      istrue:true,
      requireAuth:false
    }
  },
  {
    path: '/Cart',
    name: 'Cart',
    component: () => import('../views/Cart.vue'),
    meta:{
      istrue:false,
      requireAuth:true
    }
  },
  {
    path: '/Mycentre',
    name: 'Mycentre',
    component: () => import('../views/Mycentre.vue'),
    meta:{
      istrue:true,
      requireAuth:true
    }
  },
  {
    path: '/Csyjp',
    name: 'Csyjp',
    component: () => import('../views/Csyjp.vue'),
    meta:{
      istrue:true,
      requireAuth:true
    }
  },
  {
    path: '/Login',
    name: 'Login',
    component: () => import('../views/Login.vue'),
    meta:{
      istrue:false,
      requireAuth:false
    }
  },
  {
    path: '/Reg',
    name: 'Reg',
    component: () => import('../views/Reg.vue'),
    meta:{
      istrue:false,
      requireAuth:false
    }
  },
  {
    path: '/Jonathan',
    name: 'Jonathan',
    component: () => import('../views/Jonathan.vue'),
    meta:{
      istrue:true,
      requireAuth:true
    }
  },
  {
    path: '/Sousuo',
    name: 'Sousuo',
    component: () => import('../views/Sousuo.vue'),
    meta:{
      istrue:true,
      requireAuth:true
    }
  },
  {
    path: '/Gdetails',
    name: 'Gdetails',
    component: () => import('../views/Gdetails.vue'),
    meta:{
      istrue:false,
      requireAuth:true
    }
  },
  {
    path: '/Balance',
    name: 'Balance',
    component: () => import('../views/Balance.vue'),
    meta:{
      istrue:false,
      requireAuth:true
    }
  },
  {
    path: '/Address',
    name: 'Address',
    component: () => import('../views/Address.vue'),
    meta:{
      istrue:true,
      requireAuth:true
    }
  },
  {
    path: '/Creatdizi',
    name: 'Creatdizi',
    component: () => import('../views/Creatdizi.vue'),
    meta:{
      istrue:true,
      requireAuth:true
    }
  },
  {
    path: '/Shoucang',
    name: 'Shoucang',
    component: () => import('../views/Shoucang.vue'),
    meta:{
      istrue:true,
      requireAuth:true
    }
  },
  {
    path: '/Gerxx',
    name: 'Gerxx',
    component: () => import('../views/Gerxx.vue'),
    meta:{
      istrue:true,
      requireAuth:true
    }
  },
  {
    path: '/Xiugai',
    name: 'Xiugai',
    component: () => import('../views/Xiugai.vue'),
    meta:{
      istrue:false,
      requireAuth:false
    }
  },
  {
    path: '/Dindan',
    name: 'Dindan',
    component: () => import('../views/Dindan.vue'),
    meta:{
      istrue:false,
      requireAuth:true
    }
  }
]

const router = new VueRouter({
  routes
})

export default router
